<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div class="div">
    <li class="l1">0</li>
    <li class="l2">1</li>
    <li class="l3">2</li>
    <li class="l4">3</li>
  </div>
  <script>
    const div = document.getElementsByClassName('div')[0];
    console.log(div.children)
    div.insertBefore(div.children[2], div.children[3])
  </script>
</body>
</html>